from owl_ai.service.tools.date_tool import now_time


class ToolCenter:
    """
    工具中心
    """

    tools_registry = {}

    @classmethod
    def register_tool(cls, tool):
        """
        注册工具
        """
        cls.tools_registry[tool.name] = tool

    @classmethod
    def get_tool(cls, tool_name):
        """
        获取工具
        """
        return cls.tools_registry.get(tool_name)


ToolCenter.register_tool(now_time)
